package com.alibaba.algo.exception;

import lombok.Getter;

/**
 * @author Fan.tianpeng
 * @date 2021/5/8 12:56
 */
@Getter
public enum BaseErrorCode {

    PAGE_INDEX_IS_NULL(10000, "pageIndex is null"),
    PAGE_SIZE_IS_NULL(10001, "pageSize is null"),
    GROUP_ID_IS_NULL(10002, "groupId is null"),
    ORG_ID_IS_NULL(10003, "orgId is null"),
    PARENT_ORG_ID_IS_NULL(10004, "parentOrgId is null"),
    ROLE_ID_IS_NULL(10005, "roleId is null"),
    RESOURCE_ID_IS_NULL(10006, "resourceId is null"),
    GROUP_CODE_IS_NULL(10007, "groupCode is null"),
    GROUP_NAME_IS_NULL(10008, "groupName is null"),
    USER_ID_IS_NULL(10009, "userId is null"),
    EMPLOYEE_ID_IS_NULL(10010, "employeeId is null"),
    APP_ID_IS_NULL(10011, "appId is null"),
    EMPLOYEE_GROUP_ID_IS_NULL(10012, "employeeGroupId is null"),
    APP_FUNCTION_ID_IS_NULL(10013, "appFunctionId is null"),
    USER_ACCOUNT_IS_NULL(10014, "userAccount is null"),
    USER_PASSWORD_IS_NULL(10015, "userPassWd is null"),
    PARENT_ORG_UUID_IS_NULL(10016, "parentOrgUuid is null"),
    EMPLOYEE_ID_LIST_IS_NULL(10017, "employeeIdList is null"),
    CODE_IS_NULL(10018, "code is null"),
    NAME_IS_NULL(10019, "name is null"),
    APP_CODE_IS_NULL(10020,"appCode is null"),
    POSITION_ID_IS_NULL(10021,"position id is null"),
    USER_ID_AND_EMPLOYEE_CODE_AND_ACCOUNT_IS_NULL(10022, "userId and employeeCode and userAccount is null"),
    ORG_ID_AND_ORG_CODE_IS_NULL(10023, "orgId and orgCode is null"),
    PARENT_ORG_ID_AND_PARENT_ORG_CODE_IS_NULL(10024, "parentOrgId and parentOrgCode is null"),
    POS_CODE_IS_NULL(10025, "posCode is null"),
    ROLEID_OR_APPCODE_LIST_IS_NULL_OR_EMPTY(10026, "roleId or appcode  is null or empty"),
    USERID_EMAIL_PHONE_IS_NULL(10027, "user or email or phone is null"),
    ORG_ID_ORG_CODE_IS_NULL(10028, "orgId and orgCode is null"),
    ROLE_ID_ROLE_CODE_IS_NULL(10029, "roleId and roleCode is null"),
    USER_NAME_IS_NULL(10030, "userName is null"),
    PARAM_IS_NULL(10031, "parameter is null"),
    USER_ID_OR_EMPLOYEE_CODE_IS_NULL(10032,"userId or employeeCode is null"),
    EMPLOYEE_NOT_EXISTS(10033, "employee not exists"),
    MID_ID_IS_NULL(10034,"mid is null"),
    USER_ID_OR_USER_CODE_IS_NULL(10035,"userId or userCode is null"),
    USER_NOT_EXISTS(10036, "user not exists"),
    RESOURCE_NAME_IS_NULL(10037, "resourceName is null"),
    ;

    private Integer code;

    private String message;

    BaseErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
